

package com.hazelcast.nio.serialization;

/**
 * PortableFactory is used to create Portable instances during de-serialization.
 *
 * @see com.hazelcast.nio.serialization.Portable
 * @see com.hazelcast.nio.serialization.VersionedPortable
 * @deprecated Portable Serialization has been deprecated. We recommend you use Compact Serialization as Portable Serialization
 * will be removed as of version 7.0.
 */
@Deprecated(since = "5.4", forRemoval = true)
@FunctionalInterface
public interface PortableFactory {

    /**
     * Creates a Portable instance using the given class ID
     *
     * @param classId portable class ID
     * @return portable instance or null if class ID is not known by this factory
     */
    Portable create(int classId);
}
